<template>
  <div class="applicationparent">
    <Application :UserData="ApplicationData" />
  </div>
</template>
<script>
import { getApplication } from "../assets/api/api";
// import Application from "./Application";
import User from "./User";

export default {
  components: {
    Application: User,
  },
  data() {
    return {
      ApplicationData: [],
      timer: null
    };
  },
   mounted() {
      this.fetchData();
      this.timer = setInterval(()=>{
      this.fetchData()
      },this.howtimeout)
  },
  methods: {
    fetchData() {
      getApplication().then((res) => {
        //console.log(res);
        this.ApplicationData = res.data.result;
      });
    },
  },
  destroyed() {
    clearInterval(this.timer);
  },
};
</script>
